(define-macro/err (set-line-beg/cyl-aux cyl)
  `(if (eq? st '结束分隔符)
       (set! line-beg #t)
       (set! line-beg #f)))
(define-macro/err (set-define-status/cyl-aux cyl)
  `(if (eq? st '结束分隔符)
       (set! cyl-define-status 'top-level)
       ))
(define-macro/err (handle-macro/cyl-aux cyl cyl-l str-l)
  `(begin
     (if (string? cyl-adverb-value)
	 (begin
	   (push cyl-adverb-value cyl-current-macro)
	   (let-set! (res-str loc res-cyl res-st deli-cyl) (run/err cyl-macro s (+ loc 1) cyl-adverb-value ,cyl-l ,str-l))
	   )
	 (begin
	   (push last-str cyl-current-macro)
	   (let-set! (res-str loc res-cyl res-st deli-cyl) (run/err cyl-macro s (+ loc 1) last-str))
	   ))
     ;;(y-or-n "handle-macro/cyl-aux:cyl-current-macro=~a,res-cyl=~a,deli-cyl=~a\n" cyl-current-macro res-cyl deli-cyl)
     (if (and (string? (car cyl-current-macro))(string=? (car cyl-current-macro) "注册"))
	 (let ((pp (open-input-string (cyl->scm res-cyl))))
	   (eval (read pp))
	   ))
	   
     (pop cyl-current-macro)
     (set! res-deli-st (nth 3 deli-cyl))
     ;;(y-or-n "CYL_aux0:fd-cyl-l=~a,cb-cyl-l=~a,cyl-define-status=~a.\n" fd-cyl-l cb-cyl-l cyl-define-status)
     (cond
      ((eq? cyl-define-status 'top-level)
       (push res-str cb-str-l)
       (push res-cyl cb-cyl-l)
       ;;(push deli-cyl cb-cyl-l)
       ;;(push (nth 0 deli-cyl) cb-str-l)
       ;;(y-or-n "CYL_aux0:fd-cyl-l=~a,cb-cyl-l=~a,cyl-define-status=~a.\n" fd-cyl-l cb-cyl-l cyl-define-status)
       (cond
	((eq? res-deli-st '语句终结分隔符)
	 (push deli-cyl cb-cyl-l)
	 (push (nth 0 deli-cyl) cb-str-l)
	 )
	((eq? res-deli-st '结束分隔符)

	 (push (merge-list loc cb-cyl-l) cyl-l)
	 (push (merge-str loc cb-str-l) str-l)
	 (push deli-cyl cyl-l)
	 (push (nth 0 deli-cyl) str-l)
	 (set! cb-cyl-l '())
	 (set! cb-str-l '())
	 ;;(set! cyl-deine-status 'top-level)
	 (set! cyl-line-begin #t)
	 )
	(else (exit-cyl (list #f loc st '非法语法 (err-format 'cyl loc "top-level下不允许上传非结束分隔符。[~a]" res-deli-st)))))
       )
      ((eq? cyl-define-status 'func-define)
       (push res-str cb-str-l)
       (push res-cyl cb-cyl-l)
       (push deli-cyl cb-cyl-l)
       (push (nth 0 deli-cyl) cb-str-l)
       (cond
	((eq? res-deli-st '语句终结分隔符)
	
	 )  ;;;need edit
	((eq? res-deli-st '结束分隔符)
	 (make-cyl-list/func-aux)
	 (set! cyl-define-status 'top-level)
	 (set! cyl-line-begin #t)
	 )
	(else (exit-cyl (list #f loc st '非法语法 (err-format 'cyl loc "func-define下不允许上传结束分隔符以外的分隔符。[~a]" res-deli-st)))))
       )
      (else (exit-cyl (list #f loc st '非法语法 (err-format 'cyl loc "cyl-define-status[~a]只允许top-level和func-define，开发错误。" cyl-define-status)))))))

(define-macro/err (set-define-func-name-cyl/cyl-aux cyl)
  `(begin
     ;;(y-or-n "set-define-func-name-cyl:at-define-list=~a,last-cyl=~a\n" cyl-at-define-list last-cyl)
     (cond
    ((and (pair? last-cyl)(eq? (nth 3 last-cyl) '词语)(null? cyl-at-define-list))
     (cyl-fn-coding-get (nth 0 last-cyl))
     (let* ((cur-fn (nth 0 last-cyl))
	    (cur-coding-l (find-local-coding-list cur-fn))
	    (cur-coding (if cur-coding-l (cadr cur-coding-l) (append-new-coding cur-fn '无参函数 0)))
	    )
       (set! define-func-name/flag #t)
       (set-car! (list-tail last-cyl 3) '无参函数名定义)
       (set-car! (list-tail last-cyl 2) cur-coding)
      
       last-cyl
       ))
    ((and (pair? last-cyl)(eq? (nth 3 last-cyl) '词语)(pair? cyl-at-define-list))
     (set-func-assign-at-list/cyl-aux))
    ((and (pair? last-cyl)(st-is (nth 3 last-cyl) 'y表达式函数名定义)(null? cyl-at-define-list))
     ;;(y-or-n "test10\n" )
     (let* ((cur-cyl (nth 0 last-cyl))
	    (cur-typ (nth 3 last-cyl))
	    (cur-fn (nth 5 last-cyl))
	    (cur-par (nth 6 last-cyl))
	    (cur-coding-l (find-local-coding-list cur-fn))
	    (cur-coding (if cur-coding-l
			    (cadr cur-coding-l)
			    (cond
			     ((eq? cur-typ '无限参数函数名定义)
			      (append-new-coding cur-fn '无限参数函数 cur-par))  ;;无限参数函数不支持@表达式！！！
			     (else (append-new-coding cur-fn '函数 cur-par)))
			    ))
	    (cur-st (nth 3 last-cyl))
	    )
       ;;(y-or-n "test11:cur-cyl=~a\n" cur-cyl )
       (cyl-fn-coding-get cur-fn)
       ;;(y-or-n "test111:cur-cyl=~a\n" cur-cyl )
       (tr-list (i e cur-cyl 0)
		;;(y-or-n "test11:e=~a\n" e)
		(if (and (pair? e)(string? (car e)))
		      (cond
		       ((eq? (nth 3 e) '词语参数)
			(set-car! (list-tail e 3) '参数)
			(set-car! (list-tail e 2) (append-new-coding (car e) '参数变量 0)))
		       ((eq? (nth 3 e) '词语)
			(set-car! (list-tail e 3) '函数名片段)
			(set-car! (list-tail e 2) cur-coding))
		       (else (exit-cyl (handle-error s (list 'err loc (cadr last-cyl) '非法语法 (err-format 'cyl->set-define-func-name-cyl/cyl-aux loc "[~a]只允许是词语参数或词语，其它非法。" (nth 3 e))))))
		       )
		      (exit-cyl (handle-error s (list 'err loc (cadr last-cyl) '非法语法 (err-format 'cyl->set-define-func-name-cyl/cyl-aux loc "函数名y表达式中每一项都必须是原子y表达式。[~a]" e))))))
       ;;(y-or-n "test12\n" )
       	 (set! define-func-name/flag #t)
		 
	 (list cur-cyl (merge-num loc cur-cyl 1) 0 cur-st (cyl-serial) cur-fn cur-par)))
    ((and (pair? last-cyl)(st-is (nth 3 last-cyl) 'y表达式函数名定义)(pair? cyl-at-define-list))
     (set-func-assign-at-list/cyl-aux))
    (else (set! define-func-name/flag #f)
	  last-cyl))))
		       
(define-macro/err (make-cyl-list/top-aux cyl)
  `(let ((cur-num (length cb-cyl-l))
	 (cur-cyl (merge-list loc cb-cyl-l))
	 )
     (if (<= cur-num 1)
	 (begin
	   (push (merge-str loc cb-str-l) str-l)
	   (cond
	    ((= cur-num 0)
	     )
	    ((= cur-num 1)
	     (push (car cb-cyl-l) cyl-l))
	    (else
	     (exit-make-cyl-list/top-aux (list 'err loc 'make-cyl-list/top-aux (format "错误提示：命令列表长度不合法[~a]。开发错误。" cur-num)))
	     )
	    ))
	 (begin
	   (push (merge-str loc cb-str-l) str-l)
	   (push (list cur-cyl (merge-num loc cur-cyl 1) 0 '并列语句 (cyl-serial)) cyl-l)))
     (set! cb-str-l '())
     (set! cb-cyl-l '())
     ))
(define-macro/err (make-cyl-list/func-aux cyl)
  `(let ((cur-str "")
	 (cur-cyl '())
	 )
     ;;(y-or-n "CYL_func-aux0:fd-cyl-l=~a,cyl-l=~a.cb-cyl-l=~a" fd-cyl-l cyl-l cb-cyl-l)
     (cond
      ((and fd-cyl-l (null? cb-cyl-l))
       (handle-error (list #f loc st '非法语法 (err-suggest 'cyl->make-cyl-list/func-aux loc "函数定义没有函数体，函数体将被定义为空。")))
       (set! cur-cyl (list "" 0 sys-nil '系统常量 (cyl-serial)))
       (set! cur-cyl (append (merge-list loc fd-cyl-l) (list cb-cyl-l 0 0 '函数体定义 (cyl-serial))))
       (push (list cur-cyl (merge-num loc cur-cyl 1) 0 '函数定义 (cyl-serial)) cyl-l)
       (push (merge-str loc fd-str-l) str-l)
       )
      ((and fd-cyl-l cb-cyl-l)
       ;;(y-or-n "CYL_func-aux0:fd-cyl-l=~a,cyl-l=~a.cb-cyl-l=~a" fd-cyl-l cyl-l cb-cyl-l)
       (set! cur-cyl (list (merge-list loc cb-cyl-l) (merge-num loc cb-cyl-l 1) 0 '函数体定义 (cyl-serial)))
       (set! cur-cyl (append (merge-list loc fd-cyl-l) (list cur-cyl)))
       (push (list cur-cyl (merge-num loc cur-cyl 1) 0 '函数定义 (cyl-serial)) cyl-l)
       (set! cur-str (string-append (merge-str loc fd-str-l) (merge-str loc cb-str-l)))
       (push cur-str str-l)
       ;;(y-or-n "CYL_func-aux1:fd-cyl-l=~a,cyl-l=~a.cb-cyl-l=~a" fd-cyl-l cyl-l cb-cyl-l)
       )
      (else (handle-error s (list 'err loc 0 '非法语法 (err-format 'cyl loc "开发错误，不应该到达此处。[~a]" fd-cyl-l))))
      )
     (set! fd-cyl-l '())
     (set! cb-cyl-l '())
     (set! fd-str-l '())
     (set! cb-str-l '())
     (handle-local-dict-end-func)
     ))
(define-macro/err (rewrite-ciyu/cyl-aux-1 cyl typ)
  `(let ((cur-cyl (merge-list loc cb-cyl-l))
	 (res #f)
	 )
     ;;(y-or-n "REW111:cur-cyl=~a.\n" cur-cyl)
     (if (eq? (nth 3 cur-cyl) '词语)
	 (begin
	   (set! res (find-current-coding-list (car cur-cyl)))
	   (if res
	       (begin
		 (set-car! (list-tail cur-cyl 3) (nth 0 res))
		 (set-car! (list-tail cur-cyl 2) (nth 1 res)))
	       (cond
		((eq? ,typ '局部变量)
		 (set-car! (list-tail cur-cyl 3) '局部变量)
		 (set-car! (list-tail cur-cyl 2) (append-new-coding (car cur-cyl) '局部变量 0)))
		((eq? ,typ '全局变量)
		 (set-car! (list-tail cur-cyl 3) '全局变量)
		 (set-car! (list-tail cur-cyl 2) (append-new-coding (car cur-cyl) '全局变量 0)))
		((or (eq? ,typ '无参函数)(eq? ,typ '函数))
		 (let* ((cur-fn (car cur-cyl))
		       (cur-coding (append-new-coding cur-fn ,typ 0))
		       )
		   (set-car! (list-tail cur-cyl 3) ,typ)
		   (set-car! (list-tail cur-cyl 2) cur-coding)
		   (push (list cur-fn cur-coding '未定义函数 ,typ cyl-current-define-function-name) cyl-undefined-symbol-list)) 
		 )
		(else (handle-error s (list 'err loc (nth 2 cur-cyl) '非法语法 (err-format 'cyl->rewrite-ciyu/cyl-aux loc "[~a]类型未定义。" typ))))))))
      cur-cyl))
(define-macro/err (handle-local-dict-end-func cyl)
  `(cyl-fn-coding-push cyl-current-define-function-name)
  )
(define-macro/err (set-func-assign-at-list/cyl-aux cyl)
  `(let ((at-define-list (nth 1 cyl-at-define-list))
	 (at-st (nth 0 cyl-at-define-list))
	 (fn (nth 2 cyl-at-define-list))
	 (par (nth 3 cyl-at-define-list))
	 )
     ;;(y-or-n "set-func-assign-at-list:at-define-list=~a\n" cyl-at-define-list)
     (if (eq? at-st '函数定义@表达式)
	 (if (eq? cyl-define-status 'func-define)
	     (exit-cyl (list 'err i 'handle-at->set-var-assign/at-aux (format "此位置只能处理函数定义@表达式，但实际是[~a] 。" at-st)))
	     (let ((first-st (nth 0 (nth 0 at-define-list)))
		   (second-st (nth 1 (nth 0 at-define-list)))
		   (third-st (nth 2 (nth 0 at-define-list)))
		   (len (length at-define-list))
		   (cur-coding #f)
		   (cur-mf #f)
		   )
	       (set! cyl-current-func-type first-st)
	       ;;(y-or-n "set-func-assign(1):fn=~a,par=~a,len=~a,local-dict=~a,current-dict=~a\nat-define-list=~a\n" fn par len cyl-local-symbol-dict-list cyl-current-symbol-dict-list at-define-list)
	       (cond
		((and (= par 0)(= len 1)(eq? first-st '全局局部函数))
		 (set! cur-coding (cyl-undefined-func-handle fn))
		 (if cur-coding
		     (append-coding-atexp fn cur-coding '无参全局局部函数 0 '() '())
		     (append-new-coding-atexp fn '无参全局局部函数 0 '() '()))
		 (set! cyl-current-define-function-name fn)
		 (run/err set-no-par-func-name-cyl/cyl-aux)
		 )
		((and (> par 0)(= len 1)(eq? first-st '全局局部函数))
		 (set! cur-coding (cyl-undefined-func-handle fn))
		 (if cur-coding
		     (append-coding-atexp fn cur-coding '全局局部函数 0 '() '())
		     (append-new-coding-atexp fn '全局局部函数 0 '() '()))
		 (set! cyl-current-define-function-name fn)
		 (run/err set-no-par-func-name-cyl/cyl-aux)
		 )
		((and (= par 0)(> len 1)(eq? first-st '全局局部函数))
		 (set! cur-coding (cyl-undefined-func-handle fn))
		 (if cur-coding
		     (append-coding-atexp fn cur-coding '无参全局局部函数 0 at复合定义 at-define-list)
		     (append-new-coding-atexp fn '无参全局局部函数 0 at复合定义 at-define-list))
		 (set! cyl-current-define-function-name fn)
		 (run/err set-no-par-func-name-cyl/cyl-aux)
		 )
		((and (> par 0)(> len 1)(eq? first-st '全局局部函数))
		 (set! cur-coding (cyl-undefined-func-handle fn))
		 (if cur-coding
		     (append-coding-atexp fn cur-coding '全局局部函数 0 at复合定义 at-define-list)
		     (append-new-coding-atexp fn '全局局部函数 0 at复合定义 at-define-list))
		 (set! cyl-current-define-function-name fn)
		 (run/err set-no-par-func-name-cyl/cyl-aux)
		 )
		((and (= par 0)(= len 1)(eq? first-st '局部函数))
		 ;;(y-or-n "set-func-assign-at-list1:OK")
		 ;;(y-or-n "set-func-assign-at-list111:fn=~a,cur-coding=~a,undefined-func-list=~a\nlocal-dict=~a,current-dict=~a,local-backup=~a\n" fn cur-coding cyl-undefined-symbol-list cyl-local-symbol-dict-list cyl-current-symbol-dict-list cyl-local-symbol-backup-list)
		 (set! cur-coding (cyl-undefined-func-handle fn))
		 (set! cur-mf (get-main-func second-st third-st))
		 (make-func-tree fn second-st cur-mf)
		 (cyl-fn-parent-coding-get second-st 0)
		 ;;(y-or-n "set-func-assign-at-list222:fn=~a,cur-coding=~a,undefined-func-list=~a\nlocal-dict=~a,current-dict=~a,local-backup=~a\n" fn cur-coding cyl-undefined-symbol-list cyl-local-symbol-dict-list cyl-current-symbol-dict-list cyl-local-symbol-backup-list)
		
		 (if cur-coding
		     (begin
		       (append-parent-coding-atexp fn cur-coding '无参局部函数 0 cur-mf at-define-list)
		       (append-coding-atexp fn cur-coding '无参局部函数 0 cur-mf at-define-list))
		     (append-new-coding-atexp fn '无参局部函数 0 cur-mf at-define-list))
		 ;;(y-or-n "KKKset-func-assign-at-list3:local-dict=~a\n" cyl-local-symbol-dict-list)
		 ;;(cyl-fn-coding-push second-st)
		 (set! cyl-current-define-function-name fn)
		 ;;(y-or-n "set-func-assign-at-list333:fn=~a,cur-coding=~a,undefined-func-list=~a\nlocal-dict=~a,current-dict=~a,local-backup=~a\n" fn cur-coding cyl-undefined-symbol-list cyl-local-symbol-dict-list cyl-current-symbol-dict-list cyl-local-symbol-backup-list)
		 ;;(cyl-fn-coding-get fn)
		 ;;(y-or-n "set-func-assign-at-list4:last-cyl=~a\n" last-cyl)
		 (run/err set-no-par-func-name-cyl/cyl-aux)
		 ;;(y-or-n "set-func-assign-at-list5:OK")
		 ;;(y-or-n "set-func-assign-at-list444:fn=~a,cur-coding=~a,undefined-func-list=~a\nlocal-dict=~a,current-dict=~a,local-backup=~a\nparent-list=~a,ancestor-list=~a\n" fn cur-coding cyl-undefined-symbol-list cyl-local-symbol-dict-list cyl-current-symbol-dict-list cyl-local-symbol-backup-list cyl-parent-symbol-dict-list cyl-ancestor-symbol-dict-list)
		 )
		((and (= par 0)(= len 1)(not (eq? first-st '局部函数)))
		 (set! cur-coding (cyl-undefined-func-handle fn))
		 (cyl-fn-coding-get fn)
		 (if cur-coding
		     (append-coding-atexp fn cur-coding '无参函数 0 first-st  second-st)
		     (append-new-coding-atexp fn '无参函数 0 first-st  second-st))
		 (run/err set-no-par-func-name-cyl/cyl-aux)
		 
		 )
		((and (= par 0)(> len 1)(eq? first-st '局部函数))
		 (set! cur-coding (cyl-undefined-func-handle fn))
		 (set! cur-mf (get-main-func second-st third-st))
		 (make-func-tree fn second-st cur-mf)
		 (cyl-fn-parent-coding-get second-st 0)
		
		 (if cur-coding
		     (begin
		       (append-parent-coding-atexp fn cur-coding '无参局部函数 0 'at复合定义 at-define-list)
		       (append-coding-atexp fn cur-coding '无参局部函数 0 'at复合定义 at-define-list))
		     (append-new-coding-atexp fn '无参局部函数 0 'at复合定义 at-define-list))
		 ;;(append-new-coding-atexp fn '无参局部函数 0 (get-main-func second-st third-st) at-define-list)
		 ;;(cyl-fn-coding-push second-st)
		 (set! cyl-current-define-function-name fn)
		 ;;(cyl-fn-coding-get fn)
		 (run/err set-no-par-func-name-cyl/cyl-aux)
		 )
		((and (= par 0)(> len 1)(not (eq? first-st '局部函数)))
		 (set! cur-coding (cyl-undefined-func-handle fn))
		 (cyl-fn-coding-get fn)
		 (if cur-coding
		     (append-coding-atexp fn cur-coding '无参函数 0 'at复合定义 at-define-list)
		     (append-new-coding-atexp fn '无参函数 0 'at复合定义 at-define-list))
		 ;;(append-new-coding-atexp fn '无参函数 0 'at复合定义 at-define-list)
		 (run/err set-no-par-func-name-cyl/cyl-aux)
		 )
		((and (> par 0)(= len 1)(eq? first-st '局部函数))
		 (set! cur-coding (cyl-undefined-func-handle fn))
		 (set! cur-mf (get-main-func second-st third-st))
		 (make-func-tree fn second-st cur-mf)
		 (cyl-fn-parent-coding-get second-st 0)
		
		 (if cur-coding
		     (begin
		       (append-parent-coding-atexp fn cur-coding '局部函数 par cur-mf at-define-list)
		       (append-coding-atexp fn cur-coding '局部函数 0 cur-mf at-define-list))
		     (append-new-coding-atexp fn '局部函数 par cur-mf at-define-list))
		 ;;(append-new-coding-atexp fn '局部函数 par (get-main-func second-st third-st) at-define-list)
		 (cyl-fn-coding-push second-st)
		 ;;(cyl-fn-coding-get fn)
		 (run/err set-par-func-name-cyl/cyl-aux)
		 )
		((and (> par 0)(= len 1)(not (eq? first-st '局部函数)))
		 (set! cur-coding (cyl-undefined-func-handle fn))
		 (cyl-fn-coding-get fn)
		 (if cur-coding
		     (append-coding-atexp fn cur-coding '函数 par first-st  second-st)
		     (append-new-coding-atexp fn '函数 par first-st  second-st))
		 ;;(append-new-coding-atexp fn '函数 par first-st  second-st)
		 (run/err set-par-func-name-cyl/cyl-aux)
		 )
		((and (> par 0)(> len 1)(eq? first-st '局部函数))
		 (set! cur-coding (cyl-undefined-func-handle fn))
		 (set! cur-mf (get-main-func second-st third-st))
		 (make-func-tree fn second-st cur-mf)
		 (cyl-fn-parent-coding-get second-st 0)
		 
		 (if cur-coding
		     (begin
		       (append-parent-coding-atexp fn cur-coding '局部函数 par 'at复合定义 at-define-list)
		       (append-coding-atexp fn cur-coding '局部函数 par 'at复合定义 at-define-list))
		     (append-new-coding-atexp fn '局部函数 par 'at复合定义 at-define-list))
		 ;;(append-new-coding-atexp fn '局部函数 par (get-main-func second-st third-st) at-define-list)
		 (cyl-fn-coding-push second-st)
		 (cyl-fn-coding-get fn)
		 (run/err set-par-func-name-cyl/cyl-aux)
		 )
		((and (> par 0)(> len 1)(not (eq? first-st '局部函数)))
		 (set! cur-coding (cyl-undefined-func-handle fn))
		 (cyl-fn-coding-get fn)
		 (if cur-coding
		     (append-coding-atexp fn cur-coding '函数 par 'at复合定义 at-define-list)
		     (append-new-coding-atexp fn '函数 par 'at复合定义 at-define-list))
		 ;;(append-new-coding-atexp fn '函数 par 'at复合定义  at-define-list)
		 (run/err set-par-func-name-cyl/cyl-aux)
		 )
		(else
		 (exit-cyl (list 'err i 'handle-at->set-var-assign/at-aux (format "此位置只能处理函数定义@表达式，但实际是[~a] 。" at-st)))))
	       ;;(y-or-n "set-func-assign(2):local-dict=~a,current-dict=~a\n" cyl-local-symbol-dict-list cyl-current-symbol-dict-list)
	       ))
	 )))
		       
		  
		  
(define (get-main-func s par)
  ;;在cyl-current-symbol-dict-list中查找
  (let ((cur-rec #f)(res '()))
    (set! cur-rec (search-dict-member s cyl-current-symbol-dict-list))
    (if cur-rec
	(nth 0 cur-rec)
	(begin
	  (set! cur-rec (search-backup-dict-member s))
	  (if cur-rec
	      (begin
		(set! res (nth 5 cur-rec))
		(if (null? res)
		    (nth 0 cur-rec)
		    res))
	      (begin
		(push (list s (append-new-coding s '函数 par) '未定义函数 '函数 cyl-current-define-function-name) cyl-undefined-symbol-list)
		s)))))
  ;;如果没有，在cyl-local-symbol-backup-list中查找。
  ;;如果没有，则设定s为未定义函数。
  )

(define-macro (set-no-par-func-name-cyl/cyl-aux)
   `(let* ((cur-fn (nth 0 last-cyl))
	    (cur-coding-l (find-local-coding-list cur-fn))
	    (cur-coding #f)
	    (cur-typ #f)
	    )
       ;;(y-or-n "set-no-par-func-list1:cur-coding-l=~a\n" cur-coding-l)
      (if cur-coding-l
	  (begin
	    (set! cur-coding (nth 1 cur-coding-l))
	    (set! cur-typ (nth 0 cur-coding-l))
	    )
	  (begin
	    (set! cur-typ '无参函数)
	    (set! cur-coding (append-new-coding cur-fn cur-typ 0))
	    ))
       ;;(y-or-n "set-no-par-func-list2:OK")
       (set! define-func-name/flag #t)
       (set-car! (list-tail last-cyl 3) cur-typ)
       (set-car! (list-tail last-cyl 2) cur-coding)
       (set! cyl-at-define-list '())
       (set! cyl-define-func-name/flag #t)
       ;;(y-or-n "set-no-par-func-list3:OK")
       (list cur-fn (string-length cur-fn) cur-coding 'at表达式无参函数名定义 (cyl-serial))
       ))
(define-macro (set-par-func-name-cyl/cyl-aux)
  `(let* ((cur-cyl (nth 0 last-cyl))
	  (cur-fn (nth 5 last-cyl))
	  (cur-par (nth 6 last-cyl))
	  (cur-coding-l (find-local-coding-list last-fn))
	  ;;(cur-coding (nth 1 cur-coding-l))
	  ;;(cur-typ (nth 0 cur-coding-l))
	  (cur-st 'y表达式函数名定义)
	  )
     (if cur-coding-l
	  (begin
	    (cur-coding (nth 1 cur-coding-l))
	    (cur-typ (nth 0 cur-coding-l))
	    )
	  (begin
	    (set! cur-typ '无参函数)
	    (set! cur-coding (append-new-coding cur-fn cur-typ 0))
	    ))
     (tr-list (i e cur-cyl 0)
	      (if (and (pair? e)(string? (car e)))
		  (cond
		   ((eq? (nth 3 e) '词语参数)
		    (set-car! (list-tail e 3) '参数)
		    (set-car! (list-tail e 2) (append-new-coding (car e) '参数变量 0)))
		   ((eq? (nth 3 e) '词语)
		    (set-car! (list-tail e 3) '函数名片段)
		    (set-car! (list-tail e 2) cur-coding))
		   (else (exit-cyl (handle-error s (list 'err loc (cadr last-cyl) '非法语法 (err-format 'cyl->set-define-func-name-cyl/cyl-aux loc "[~a]只允许是词语参数或词语，其它非法。")))))
		   )
		  (exit-cyl (handle-error s (list 'err loc (cadr last-cyl) '非法语法 (err-format 'cyl->set-define-func-name-cyl/cyl-aux loc "函数名y表达式中每一项都必须是原子y表达式。[~a]" e))))))
     (set! cyl-at-define-list '())
     (set! cyl-define-func-name/flag #t)
     (list cur-cyl (merge-num loc cur-cyl 1) 0 'at表达式函数名定义 (cyl-serial) cur-fn cur-par)
     ))

(define (make-func-tree  fn df mf)
  (if (and (string? df)(string? mf)(string=? df mf))
      (set! cyl-func-tree-list (list fn df)))) ;;需要完善。
(define (pre-cyl-init)
  (set! cyl-define-status 'top-level)
  (set! cyl-line-begin #t)
  (set! cyl-undefined-symbol-list '()))
